<?php
    session_start();
    include 'Record.class.php';
    if(!empty($_POST['action'])){
        $record=new Record();
        $action=Record::Filter($_POST['action']);
        if($action=='rock'){
            $res=$record->Rock();
            echo $res;
        }else if($action=='commit'){
            $phone=Record::Filter($_POST['phone']);
            echo $record->add($phone);
        }else{
            echo 0;
        }

    }else{
        return 0;
    }




